#include "dog97.h"

Dog97::Dog97() {}

void Dog97::showAge()
{
    this->age++;
    // this指针总是指向调用本方法对象的首地址
    cout << "AGE:"  << this->age <<endl;
}

void Dog97::nothisFunc( )
{
    bool b = this ==nullptr;
    cout << "B: " << b<< endl;
    cout << "OK" << endl;
}
/**
 * @brief Dog97::constFunc
 * 如果我们期望一个函数不修改对象的属性，那么这个函数应该定义为常 函数
 */
void Dog97::constFunc() const
{
    //  this->age++;
}

string Dog97::toString() const
{
    this->m_B ++ ;
    return   "Dog"; //   "{\"age\": " + this->age + "}";
}
